<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>排行榜子窗口</title>
		<link rel="stylesheet" type="text/css" href="../../css/api.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/base.css">
		<style>
			body {
			}
			.pic_img_id {
				float: left;
				height: 30px;
				margin-top: 5px;
			}
			.pic_img_id2 {
				float: left;
				width: 40px;
				height: 40px;
				border-radius: 32px;
				    margin-left: 20px;
			}
			.div_user {
				line-height: 40px;
				margin-left: 90px;
			}
			.right{    float: right;
			}
			.font26{
			font-size: 26px;
			}
			.right20{
			margin-right: 20px
			}
		</style>
	</head>
	<body>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell">
				<div class="clearfix">
					<img src="../../image/first.png" class="pic_img_id"/>
					<img src="../../image/diaocha.png"  class="pic_img_id2"/>
					<div class="div_user">
						
						<samp class="base_dark_grey base_title_font">李四</samp>
						<samp class="base_dark_grey font26 right right20"> 1900</samp>
					</div>
				</div>
			</li>
			<li class="mui-table-view-cell">
				<div class="clearfix">
					<img src="../../image/first.png" class="pic_img_id"/>
					<img src="../../image/diaocha.png"  class="pic_img_id2"/>
					<div class="div_user">
						
						<samp class="base_dark_grey base_title_font">李四</samp>
						<samp class="base_dark_grey font26 right right20"> 1900</samp>
					</div>
				</div>
			</li>
			<li class="mui-table-view-cell">
				<div class="clearfix">
					<img src="../../image/first.png" class="pic_img_id"/>
					<img src="../../image/diaocha.png"  class="pic_img_id2"/>
					<div class="div_user">
						
						<samp class="base_dark_grey base_title_font">李四</samp>
						<samp class="base_dark_grey font26 right right20"> 1900</samp>
					</div>
				</div>
			</li>
		</ul>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/MD5.js"></script>
	<script src="../../script/jquery.min.js" type="text/javascript"></script>
	<script type="text/javascript" src="../../script/requestTool.js"></script>
	<script src="../../script/common.js"></script>
	<script type="text/javascript">
		apiready = function() {
			loadNewData();
			setRefreshHeader();
			setPullUpRefresh();
		};
		function loadNewData() {
			page = 1;
			loadData();
		}

		function loadMoreData() {
			page++;
			loadData();
		}

		//获取班级学生列表
		function loadData() {
			showProgress();
			pageParam = api.pageParam;
			var params = {
				jid : $api.getStorage('cfnetppjxid'),
				uid : $api.getStorage('cfnetppuid'),
			};
			cfnetppPOST(url_getClassWorkList, params, true, function(data, status) {
				//				alert(JSON.stringify(params));
				api.hideProgress();
				api.refreshHeaderLoadDone();
				if (status == 'success') {
					if (data.code == 200) {
						var students = data.data.list;
						refreshCount = data.data.total;
						if (students != '' && students.constructor == Array && students.length > 0) {
							$('#noData').hide();
							$('#noNet').hide();
							$('#mian').show();
							writelist(students, students.length);
						} else {
							$('#noData').show();
							$('#noNet').hide();
							//							api.toast({
							//								msg : '该章节下暂无学生'
							//							});
						}
					} else if (data.code = 109) {
						if (page == 1) {
							$('#noData').show();
							$('#noNet').hide();
							$('#mian').hide();
						}
					} else {
						if (page == 1) {
							$('#noData').show();
							$('#noNet').hide();
							$('#mian').hide();
						}
					}
				} else {
					$('#noData').hide();
					$('#noNet').show();
					$('#mian').hide();
					//					api.toast({
					//						msg : '获取学生列表失败'
					//					});
				}
			});
		}

		function writelist(quar_list, len) {
			var data = '';
			var strhtml = '';
			var typeStr = '';
			var IdStr = '';
			for (var i = 0; i < len; i++) {
				data = quar_list[i];
				var typeStr = '';
				if (data.status == 1) {

					typeStr = '<img src="../../image/first.png" class="pic_img_id"/>';
				} else if (data.status == 2) {//驳回
					typeStr = '<img src="../../image/second.png" class="pic_img_id"/>';
				} else if (data.status == 3) {//已审阅
					typeStr = '<img src="../../image/third.png" class="pic_img_id"/>';
					
				}
				var str = '<li class="mui-table-view-cell">'+
				'<div class="clearfix">'+
					'<img src="../../image/diaocha.png"  class="pic_img_id2"/>'+
					'<div class="div_user">'+						
						'<samp class="base_dark_grey base_title_font">'+李四+'</samp>'
						'<samp class="base_dark_grey font26 right right20">'+1900+'</samp>'
					'</div>'+
				'</div>'+
			'</li>';
				strhtml = strhtml + str;
			}
			if (page == 1) {
				$('#quar_list').html(strhtml);
			} else {
				$('#quar_list').append(strhtml);
			}
		}
	</script>
</html>